package com.cssiot.scala.entity

import java.util.Date

import scala.beans.BeanProperty

import org.hibernate.annotations.GenericGenerator

import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.Id
import javax.persistence.Table



/**
 * 监控数据
* @ClassName: Gzz01Info 
* @Description: TODO （描述）
* @author 作者 jacking
* @date 2016年10月28日 下午2:17:13
 */
@Entity
@Table(name = "t_bd_gzz01Info_test")
class Gzz01InfoTest{
  @Id
	@GenericGenerator(name="uuid",strategy="uuid")
	@GeneratedValue(generator="uuid")
	@Column(name = "id", unique = true, nullable = false)
	@BeanProperty
  var id:String=_ // ID
  @BeanProperty
	var createTime:Date =new Date();//生成 记录时间
  @BeanProperty
	var updateTime:Date =createTime;//修改 记录时间
  @BeanProperty
  var protocolID:String =_;// 协议编号cssp
  @BeanProperty
	var syncID:String=_;// 同步序号0~255，默认从0开始，每帧递增，到255后归0
  @BeanProperty
	var deviceID:String=_;//设备编号 唯一标识符
  @BeanProperty
	var typeId:String=_;//数据类型id（如raw,ver等 )。
  @BeanProperty
	var dataValue:String=_;//数据值
  @BeanProperty
	var isDate:Integer=_;//是否有时间戳0:无，1：有
  @BeanProperty
	var oldDate:Date=_;//数据原有时间戳
  
 
/*  def this(test:String,age:Int){
    this(test)
    this.age=age
  }*/
    //主构造和子构造
// class Gzz01InfoTest(var dataValue:String){
//  
//  }
// var test=""
/*   def this(test:String){
//   this.dataValue=test
  }*/
  
/*  def this(fn : String, ln : String) = {
//    this()
    this.fn
    
    } */
    def this(dataValue : String) {
    this
    this.dataValue=dataValue
    
    } 
    
    
    def this(protocolID:String,dataValue : String) {
    this
    this.protocolID=protocolID
     this.dataValue=dataValue
    
    }
       def this(id:String,protocolID:String,dataValue : String) {
    this
    this.id=id
    this.protocolID=protocolID
     this.dataValue=dataValue
    
    }

	
	override def toString():String= {
		return "Gzz01InfoTest [protocolID=" + protocolID + ", dataValue=" + dataValue +", id=" + id + "]";
		
	} 
	
	
    
    
    
    
}

 
